// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** 新增接口 新增接口 POST /interfaceManage/addInterface */
export async function addInterfaceUsingPost(
  body: dataFactory.DTO3,
  options?: { [key: string]: any },
) {
  return request<dataFactory.R>('/interfaceManage/addInterface', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 校验接口 校验接口 GET /interfaceManage/checkInterface */
export async function checkInterfaceUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: dataFactory.checkInterfaceUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<dataFactory.R>('/interfaceManage/checkInterface', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 删除接口 通过ID删除接口 DELETE /interfaceManage/deleteInterface/${param0} */
export async function deleteInterfaceUsingDelete(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: dataFactory.deleteInterfaceUsingDELETEParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<dataFactory.R>(`/interfaceManage/deleteInterface/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 获取接口 通过ID获取接口 GET /interfaceManage/getInterface */
export async function getInterfaceUsingGet(options?: { [key: string]: any }) {
  return request<dataFactory.R>('/interfaceManage/getInterface', {
    method: 'GET',
    ...(options || {}),
  });
}

/** 分页查询接口 分页查询接口 GET /interfaceManage/pageList */
export async function listPageInterfaceUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: dataFactory.listPageInterfaceUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<dataFactory.R>('/interfaceManage/pageList', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 更新接口 通过ID更新接口 PUT /interfaceManage/updateInterface */
export async function updateInterfaceUsingPut(
  body: dataFactory.DTO,
  options?: { [key: string]: any },
) {
  return request<dataFactory.R>('/interfaceManage/updateInterface', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
